<template>
	<view class="main">
		<view class="">
			<text>{{json.last_found_title}}</text>
		</view>
		<view class="user">
			<image :src="json.avatarurl" class="touxiang"></image>
			<text class="username">{{json.username}}</text>
		</view>
		<view class="content">
			<text>{{json.last_found_withtitle}}</text>
			<image v-for="(item,index) in json.imagesList" :src="item.img_url" mode=""></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				json: {},
				myId:''
			}
		},
		onLoad: function(option) { //option为object类型，会序列化上个页面传递的参数 
			this.myId = option.id;
			this.Refresh();
		},
		methods: {
			//加载
			Refresh() {
				this.$http({
					url: "/lastfound/findAllLastFound",
					method: "get",
				}).then(res => {
					let arr = res.data.data;
					arr.forEach(v=>{
						if(v.id==this.myId){
							console.log(v);
							this.json=v;
						}
					})
				})
			},
		}
	}
</script>

<style>

</style>
